import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from "@/views/index.vue"

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: '首页',
    component: Home
  },
  {
    path: '/login',
    name: '登录',
    component: () => import("@/views/me/userLogin.vue")
  },
  {
    path: '/myNews',
    name: "我的信息",
    component: () => import("@/views/me/MyNews.vue")
  },
  {
    path: '/newsInfo',
    name: '信息详情',
    component: () => import("@/components/newsInfo.vue")
  },
  {
    path: '/userDtl',
    name: '用户信息',
    component: () => import("@/views/userDtl/index.vue")
  },
  {
    path: '/setting',
    name: '设置',
    component: () => import("@/views/me/setting.vue")
  },
  {
    path: '/recommendSongs',
    name: '每日推荐',
    component: () => import("@/views/recommendSongs/index.vue")
  },
  {
    path: '/ranking',
    name: '排行榜',
    component: () => import("@/views/rankingList/index.vue")
  },
  {
    path: '/rankingDtl',
    name: '排行榜详情',
    component: () => import("@/views/rankingList/rankingDtl.vue")
  },
  {
    path: '/comment',
    name: '评论',
    component: () => import("@/views/rankingList/comment.vue")
  },
  {
    path: '/yunbei',
    name: '云贝中心',
    component: () => import("@/views/me/YunbeiCore.vue")
  },
  {
    path: '/user',
    name: '用户中心',
    component: () => import("@/views/me/userDetails.vue")
  },
  {
    path: '/userInfo',
    name: '用户详情',
    component: () => import("@/views/userInfo/index.vue")
  },
  {
    path: '/songSheet',
    name: '歌单',
    component: () => import("@/views/songSheet/index.vue")
  },
  {
    path: '/songLisSquare',
    name: '歌单广场',
    component: () => import("@/views/songLisSquare")
  },
  {
    path: '/hotSearch',
    name: '热搜',
    component: () => import("@/views/search/hotSearch.vue")
  },
  {
    path: '/searchDtl',
    name: '搜索详情',
    component: () => import("@/views/search/searchDtl.vue")
  },
  {
    path: '/videoDtl',
    name: '视频详情',
    component: () => import("@/views/videoDtl/index.vue")
  }
]

const router = new VueRouter({
  mode: 'hash',
  base: process.env.BASE_URL,
  routes
})

export default router
